#!/bin/bash
#
if [ "$UID" != "0" ]
then
echo -e "\n Superuser priviledges required to install this software."
echo -e " Please run this script sudo ./install\n"
exit
fi

echo -e "\nInstalling ubuntucleaner..."
cp cleanubuntu.sh /usr/local/bin/cleanubuntu
chmod +x /usr/local/bin/cleanubuntu
echo -e "Installing locales..."
cd po	
for i in *.po
do
echo -e "${i%.*}  ";
if [ ! -d /usr/local/share/locale/${i%.*}/LC_MESSAGES ] 
then
mkdir -p /usr/local/share/locale/${i%.*}/LC_MESSAGES
fi
cp cleanubuntu.${i%.*}.mo /usr/local/share/locale/${i%.*}/LC_MESSAGES/cleanubuntu.mo
done
echo -e "Done..."
echo -e "Software installed, you can now run it by entering command: cleanubuntu"
